<template>
  <div>

  </div>
</template>
<script setup>
import { defineExpose } from 'vue';
const testFunction = () => {
    console.log('测试父组件单击子组件');
}
//defineExpose 暴露方法
defineExpose({
    testFunction
})
</script>
<style scoped>

</style>